<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<script th:inline="javascript">
/*<![CDATA[*/
  $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
  $(function(){
	  battcn.admin.menu[[${OP.menuId}]].save = function(obj) {
		var $form = $("#menu[[${OP.menuId}]]Form");  		
  		if($form.valid()){
  			battcn.ajaxJson({url:"/op_save_[[${OP.menuId}]]",data:$form.serializeArray()},function(){
  				battcn.closeWindow();
				$('#admin_menu[[${OP.menuId}]]_datagrid').bootstrapTable('refresh');
    		});
  		}; 
	};
	  laydate.render({
          elem: '#happenDate'
      });
  });


/*]]>*/
</script>
<div class="ibox float-e-margins animated fadeInRight">
	<div class="ibox-content">
		<form class="form-horizontal m-t required-validate" th:id="@{menu{menuId}Form(menuId=${OP.menuId})}" method="POST" >
			<input type="hidden" name="id" th:value="${dto?.id}"/>
			<!--<div class="form-group" th:if="${dto==null}">-->
				<!--<label class="col-sm-3 control-label">菜单：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<select class="form-control m-b" name="menuId" validate="{ required: true,messages:{required:'请选择菜单'}}">-->
						<!--<option value="">请选择菜单</option>-->
						<!--<option th:each="m : ${menus}" th:value="${m?.id}" th:selected="${m.id == dto?.menuId}" th:text="${m.name}"></option>-->
					<!--</select>-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">-->
				<!--<label class="col-sm-3 control-label">申请人姓名：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input name="money" th:value="${dto?.user}" class="form-control"-->
						   <!--validate="{required: true,maxlength:20,messages:{required:'请填写姓名',maxlength:' '}}"-->
						   <!--type="text"/>-->
				<!--</div>-->
			<!--</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">申请内容：</label>
				<div class="col-sm-8">
					<textarea name="content" cols="55" rows="3" style="resize: vertical;"
							  validate="{required: true,maxlength:5000,messages:{required:'申请内容不能为空',maxlength:' '}}"
							  class="form-control" th:text="${dto?.content}"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">金额：</label>
				<div class="col-sm-8">
					<input name="money" th:value="${dto?.money}" class="form-control"
						validate="{required: true,maxlength:20,number:true,messages:{required:'请填写金额',maxlength:' ',number:'只能输入数字'}}"
						type="text"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">申请日期：</label>
				<div class="col-sm-8">
					<input id="happenDate" name="happenDate" th:value="${dto?.happenDate}" class="form-control"
						   validate="{required: true,messages:{required:'请填写日期'}}"
						   type="text"/>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea name="remark" cols="55" rows="3" style="resize: vertical;" class="form-control" th:text="${dto?.remark}"></textarea>
				</div>
			</div>
		</form>
	</div>
</div>
</html>